<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body {
            min-height: 100vh;
            background-color: #abefe9;
        }

        body>div {
            margin: 5px;
            border: #bfa 3px solid;
            background-color: #FFCCCC;
        }

        hr {
            background-color: red;
            height: 1px;
            border: 0;
        }

        .trump-run-block {
            float: left;
            height: 100px;
            width: 100px;
            background-image: url(./static/sprite-animation/trump.png);
        }

        .d1 {
            animation: trumpRun 0.9s steps(6) infinite;
        }

        .d2 {
            background-position-y: -100px;
            animation: trumpRun 0.9s steps(6) infinite;
            clear: both;
        }

        .d3 {
            background-position-y: -200px;
            animation: trumpRun 0.9s steps(6) infinite;
        }

        .d4 {
            background-position-y: -300px;
            animation: trumpRun 0.9s steps(6) infinite;
        }

        @keyframes trumpRun {
            from {
                background-position-x: 0;
            }

            to {
                background-position-x: -600px;
            }
        }
    </style>
</head>

<body>
    <div class="d1 trump-run-block"></div>
    <div class="d3 trump-run-block"></div>
    <div class="d2 trump-run-block"></div>
    <div class="d4 trump-run-block"></div>


    <!-- 参考RMB100.html -->
    <!-- 补充 -->
    <!-- 
    animation-direction: 
        normal 默认值
        reverse 反向执行
        alternate 正着去反着回来
        alternate-reverse 与alternate相反

    animation-fill-mode:
        none 默认值，执行完之后回到初始位置
        forwards 执行完之后停在结束处
        backwards 动画延时等待时，元素就会处于开始位置
        both 结合forwards和backwards
    
        animation-play-state:
            running 默认值
            paused 暂停动画
 -->
</body>

</html>